home *** CD-ROM | disk | FTP | other *** search
- ; Copy 64-bit number
- ;
- ; Tim Victor, January 5, 1993
- ;
- ; Callable from C as follows:
- ; int ExtDup(src, dest);
- ; always return 0
- ;
-
- .model small
- .code
- public _ExtDup
- _ExtDup proc near
-
- push bp ; save caller's stack frame
- mov bp,sp ; address stack frame of this call
- push si
- push di
-
- ; simple 4-word copy - don't bother w/ string ops
- mov si,[bp+4] ; source address
- mov di,[bp+6] ; dest address
-
- mov ax,[si]
- mov [di],ax
- mov ax,[si+2]
- mov [di+2],ax
- mov ax,[si+4]
- mov [di+4],ax
- mov ax,[si+6]
- mov [di+6],ax
-
- sub ax,ax ; return 0
-
- pop di
- pop si
- pop bp
-
- ret
-
- _ExtDup endp
- end
-
-